﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class UIManager : MonoSingleton<UIManager> {
    public Button m_btn_ok;
    public InputField m_input_X;
    public InputField m_input_Y;

    private void Start()
    {
        m_btn_ok.onClick.AddListener(OnClickBtn);
    }

    public void OnClickBtn()
    {
        int x = int.Parse(m_input_X.text);
        int y = int.Parse(m_input_Y.text);
        Coord targetCoor = MapManager.Instance.GetCoord(x, y);
        GameManager.Instance.m_player.MoveTo(targetCoor);
    }

}
